package game;
import org.apache.log4j.*;
public class CrapsTable 
{
	private boolean pointSet = false;
	private int pointVal = 0;
	private BetManager myManager;
	private static Logger tableLogger = Logger.getLogger(CrapsTable.class);
	
	public CrapsTable(int NumberOfPlayers)
	{
		//TODO:build bet managers around the number of players?? 
		//		or wrap addPlayer in crapstable
		setMyManager(new BetManager());
		tableLogger.setLevel(Level.DEBUG);
	}
	
	public void close()
	{
		tableLogger.debug("Closing Table Down");
		myManager.close();
	}

	public boolean isPointSet() {
		return pointSet;
	}

	public void setPointSet(boolean isPointSet) {
		tableLogger.debug("Changing from point: " + pointSet + " to " + isPointSet);
		this.pointSet = isPointSet;
		
	}
	
	public int getPointVal() {
		return pointVal;
	}

	public void setPointVal(int newValue) {
		tableLogger.debug("Setting point value to " + newValue);
		setPointSet(true);
		pointVal = newValue;
	}
	
	public BetManager getMyManager() {
		return myManager;
	}

	public void setMyManager(BetManager myManager) {
		this.myManager = myManager;
	}

	public Logger getTableLogger()
	{
		return tableLogger;
	}
	
}
